#pragma once

#include <string_view>

#include "util/fs.h"

namespace git
{

class Cert
{
public:
    Cert() {}

    const fs::path &sshPublicKeyPath() const {
        return sshPublicKeyPath_;
    }

    void setSshPublicKeyPath(const std::string_view &path) {
        sshPublicKeyPath_ = fs::absolute(std::string(path));
    }

    const fs::path &sshPrivateKeyPath() const {
        return sshPrivateKeyPath_;
    }

    void setSshPrivateKeyPath(const std::string_view &path) {
        sshPrivateKeyPath_ = fs::absolute(std::string(path));
    }

    const std::string &sshPassphrase() const {
        return sshPassphrase_;
    }

    void setSshPassphrase(const std::string_view &passphrase) {
        sshPassphrase_ = passphrase;
    }

    const std::string &httpsUsername() const {
        return httpsUsername_;
    }

    void setHttpsUsername(const std::string_view &username) {
        httpsUsername_ = username;
    }

    const std::string &httpsPassword() const {
        return httpsPassword_;
    }

    void setHttpsPassword(const std::string_view &password) {
        httpsPassword_ = password;
    }

private:
    fs::path sshPublicKeyPath_;
    fs::path sshPrivateKeyPath_;
    std::string sshPassphrase_;
    std::string httpsUsername_;
    std::string httpsPassword_;
};

} // namespace git
